<?php

class ExcelHelper extends HtmlHelper
{
    public function drawTable($values)
    {
		$table = '<table>';
		
        foreach ($values as $v){
        	
			$table .= '<tr>';
			
			$table .= $this->drawLine($v);
			
			$table .= '<tr>';
			
        }
		
		$table .= '</table>';
		
		return $this->output($table);
    }
	
	private function drawLine($row)
    {
    	$line = '';
		
		foreach ($row as $cell){
			$val = empty($cell)?'-':$cell;
			$line .= "<td>$val</td>";				
		}
		
		return $line;
		
    }

}

?>